package rmhc.gui
{
	import flash.events.MouseEvent;
	import flash.net.URLRequest;
	import flash.net.navigateToURL;
	
	import rmhc.RMHCWall;
	import rmhc.design.StatusDesign;
	
	public class PostView extends StatusDesign
	{
		public function PostView()
		{
			super();
			btnAva.addEventListener(MouseEvent.CLICK , openApp );
			btnSite.addEventListener(MouseEvent.CLICK , openSite );
		}
		
		protected function openApp( e:MouseEvent ):void
		{
			//getUrl( "http://vkontakte.ru/app2661805" );
			RMHCWall.getWall().navigateToApp();
		}
		protected function openSite( e:MouseEvent ):void
		{
			getUrl( "http://rmhc.ru" );
		}
		
		protected function getUrl( url:String ):void
		{
			navigateToURL( new URLRequest( url ) , "_blank" );
		}
	}
}